<?php
function lang_out($search, $override = false) {
	$lang = lang_get($override); // get the language
	// if $lang[$search] is found, return. if not, return falseb
	if ( array_key_exists($search, $lang) ) {
		return $lang[$search]; // return the value
	} else {
		return die('<strong>J23 Error:</strong> Unknown phrase ('.$search.').');
	}
}

function lang_get($override = false) { 
	if ( ! $override === false && is_string($override) ) {
		$lang_dir = $override;
	} else {
		$lang_dir = J23_PAGE_LANGUAGE;
	}
	include(J23_PATH.'language/'.$lang_dir.'/general.lang.php');
	return $language;
}
?>